package com.bruce.starts.demo.thread.demo;

public class SynchronizedTest {
    public static void main(String[] args) {
        SynchronizedTest test = new SynchronizedTest();
        test.test();
    }
    public synchronized void test(){
        System.out.println("测试");
    }
    public void test2(){
        synchronized (this){

        }
    }
}
